/**
 * Tencent is pleased to support the open source community by making Tars available.
 *
 * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
 *
 * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * https://opensource.org/licenses/BSD-3-Clause
 *
 * Unless required by applicable law or agreed to in writing, software distributed
 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
// **********************************************************************
// This file was generated by a TARS parser!
// TARS version 1.0.1.
// **********************************************************************

package com.qq.tars.support.notify.prx;

import com.qq.tars.protocol.util.*;
import com.qq.tars.protocol.annotation.*;
import com.qq.tars.protocol.tars.*;
import com.qq.tars.protocol.tars.annotation.*;

@TarsStruct
public class ReportInfo {

	@TarsStructProperty(order = 1, isRequire = true)
	public int eType = 0;
	@TarsStructProperty(order = 2, isRequire = true)
	public String sApp = "";
	@TarsStructProperty(order = 3, isRequire = true)
	public String sSet = "";
	@TarsStructProperty(order = 4, isRequire = true)
	public String sContainer = "";
	@TarsStructProperty(order = 5, isRequire = true)
	public String sServer = "";
	@TarsStructProperty(order = 6, isRequire = true)
	public String sMessage = "";
	@TarsStructProperty(order = 7, isRequire = false)
	public String sThreadId = "";
	@TarsStructProperty(order = 8, isRequire = false)
	public int eLevel = 0;

	public int getEType() {
		return eType;
	}

	public void setEType(int eType) {
		this.eType = eType;
	}

	public String getSApp() {
		return sApp;
	}

	public void setSApp(String sApp) {
		this.sApp = sApp;
	}

	public String getSSet() {
		return sSet;
	}

	public void setSSet(String sSet) {
		this.sSet = sSet;
	}

	public String getSContainer() {
		return sContainer;
	}

	public void setSContainer(String sContainer) {
		this.sContainer = sContainer;
	}

	public String getSServer() {
		return sServer;
	}

	public void setSServer(String sServer) {
		this.sServer = sServer;
	}

	public String getSMessage() {
		return sMessage;
	}

	public void setSMessage(String sMessage) {
		this.sMessage = sMessage;
	}

	public String getSThreadId() {
		return sThreadId;
	}

	public void setSThreadId(String sThreadId) {
		this.sThreadId = sThreadId;
	}

	public int getELevel() {
		return eLevel;
	}

	public void setELevel(int eLevel) {
		this.eLevel = eLevel;
	}

	public ReportInfo() {
	}

	public ReportInfo(int eType, String sApp, String sSet, String sContainer, String sServer, String sMessage, String sThreadId, int eLevel) {
		this.eType = eType;
		this.sApp = sApp;
		this.sSet = sSet;
		this.sContainer = sContainer;
		this.sServer = sServer;
		this.sMessage = sMessage;
		this.sThreadId = sThreadId;
		this.eLevel = eLevel;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + TarsUtil.hashCode(eType);
		result = prime * result + TarsUtil.hashCode(sApp);
		result = prime * result + TarsUtil.hashCode(sSet);
		result = prime * result + TarsUtil.hashCode(sContainer);
		result = prime * result + TarsUtil.hashCode(sServer);
		result = prime * result + TarsUtil.hashCode(sMessage);
		result = prime * result + TarsUtil.hashCode(sThreadId);
		result = prime * result + TarsUtil.hashCode(eLevel);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof ReportInfo)) {
			return false;
		}
		ReportInfo other = (ReportInfo) obj;
		return (
			TarsUtil.equals(eType, other.eType) &&
			TarsUtil.equals(sApp, other.sApp) &&
			TarsUtil.equals(sSet, other.sSet) &&
			TarsUtil.equals(sContainer, other.sContainer) &&
			TarsUtil.equals(sServer, other.sServer) &&
			TarsUtil.equals(sMessage, other.sMessage) &&
			TarsUtil.equals(sThreadId, other.sThreadId) &&
			TarsUtil.equals(eLevel, other.eLevel) 
		);
	}

	public void writeTo(TarsOutputStream _os) {
		_os.write(eType, 1);
		if (null != sApp) {
			_os.write(sApp, 2);
		}
		if (null != sSet) {
			_os.write(sSet, 3);
		}
		if (null != sContainer) {
			_os.write(sContainer, 4);
		}
		if (null != sServer) {
			_os.write(sServer, 5);
		}
		if (null != sMessage) {
			_os.write(sMessage, 6);
		}
		if (null != sThreadId) {
			_os.write(sThreadId, 7);
		}
		_os.write(eLevel, 8);
	}

	public void readFrom(TarsInputStream _is) {
		this.eType = (int) _is.read(eType, 1, true);
		this.sApp = _is.read(sApp, 2, true);
		this.sSet = _is.read(sSet, 3, true);
		this.sContainer = _is.read(sContainer, 4, true);
		this.sServer = _is.read(sServer, 5, true);
		this.sMessage = _is.read(sMessage, 6, true);
		this.sThreadId = _is.read(sThreadId, 7, false);
		this.eLevel = (int) _is.read(eLevel, 8, false);
	}

}
